package org.jeecg.modules.demo3.peijian.service.impl;

import org.jeecg.modules.demo3.peijian.mapper.TMenuMapper;
import org.jeecg.modules.demo3.peijian.service.TMennuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wjn
 * @version V1.0
 * @date 2021/4/29 9:21
 * @Copyright © 2021/4/29 深圳卓翼航空无人机有限公司
 */
@Service
public class TMenuServiceImpl implements TMennuService {
    @Autowired
    private TMenuMapper tMenuMapper;

    @Override
    public List<String> getMenus(String id) {
        List<String> stringList = tMenuMapper.getMenus(id);
        for(int i = 0;i<stringList.size();i++){
            if(stringList.get(i).equals("购买记录")){
                stringList.remove(i);
            }
            for(int j = 0;j<stringList.size();j++){
                if(stringList.get(j).equals("所有配件")){
                    stringList.remove(j);
                }
            }
        }
        return stringList;
    }
}
